<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
    <!-- 悬浮球 -->
    <!-- <float-ball></float-ball> -->
  </div>
</template>

<script>
// import FloatBall from "../src/components/FloatBall/FloatBall.vue"

export default {
  // components: {
  //   FloatBall,
  // },
  mounted() {
    let token = localStorage.getItem("token")
    if (!token) {
      this.$get("/v1/login/verify", { token }).then(res => {
        if (res.data.msg == "token无效") {
          localStorage.removeItem("token")
        }
      })
    }
  },
}
</script>

<style lang="scss">
@import "./assets/css/login.css";
</style>
